<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="css/ui-btn.css">
    <link rel="stylesheet" href="css/ui-input.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
	<link rel="stylesheet" href="css/ui-res.css">
    <script src="js/zy_control.js"></script>
    <script src="js/zy_click.js"></script>
    <script src="js/json.js"></script>
	<script src="js/jquery-2.0.0.js"></script>
</head>
<body class="um-vp c-wh" ontouchstart>
    <div id="page_0" class="up ub ub-ver" tabindex="0">
       <!--content开始-->
        <div id="content" style="background:rgb(224,224,222);padding-left:0.4em;padding-right:0.4em;padding-top:0.5em" class="ub-f1 tx-l t-bla ">
        	
			<div style="text-align:center;padding-top:1em;font-family:Arial;font-size:1.5em;"><span>钓鱼迷</span></div>
			
           <!--块容器开始-->
<div style="margin-top:4em;border: 0.1em solid rgb(239,242,239);box-shadow:0px 1px 6px -2px;font-family:Arial; background:white;" >	
 
 	<!--文本开始-->
<div class="ub t-bla ulab" style="border-bottom:0.07em solid rgb(224,224,222)">  
<div class="uinn ulim" style="border-right:0.07em solid rgb(224,224,222);background:rgb(239,242,239)">账户</div> 
 <div class="ub-f1 c-wh uc-a1 uinput uinn4">  
 		<input id="username" placeholder=""  type="text" style="outline:none;">   
  </div>
</div>
<!--文本结束-->



	<!--文本开始-->
<div class="ub t-bla ulab">  
<div class="uinn ulim" style="border-right:0.07em solid rgb(224,224,222);background:rgb(239,242,239)">密码</div> 
 <div class="ub-f1 c-wh  uc-a1   uinput uinn4" >  
 		<input id="pswd" placeholder=""  type="password" style="outline:none;">   
  </div>

<!--文本结束-->
</div>	
 
</div>
<!--块容器结束--> 



<div class='ub umh5' style="margin-top:1.5em;border:0 solid rgb(242,239,242); font-weight:bold;font-size:1em" >
 <div class='ub-f1' style="background:rgb(224,224,222);border:0 solid rgb(242,239,242);text-align:center;">
 	<!--按钮开始-->
					<div ontouchstart="zy_touch('btn-act')" onclick="toregister()" style="background:rgb(245,248,245);width:6.8em;padding:0.8em;color:rgb(103,105,102);box-shadow:1px 1px 3px 0px;border:1px solid rgb(224,224,222)" class="btn uba  uinn2 uinl c-m1 uc-n ">注册</div>
				<!--按钮结束-->
	
	
 </div>
 <div class='ub-f1' style="background:rgb(224,224,222);border:0 solid rgb(242,239,242);text-align:center;">
 	<!--按钮开始-->
				<div ontouchstart="zy_touch('btn-act')" onclick="login()" style="background:rgb(216,73,53);width:6.8em;padding:0.8em;box-shadow:1px 1px 3px 0px;border:1px solid rgb(224,224,222)" class="btn uba  uinn2 uinl c-m2 uc-n t-wh">登录</div>
				<!--按钮结束-->
	
	
 </div>
</div>




			
       			 <!--content结束-->
    </div>
	
	
	
	
</body>
<script>
zy_init();


window.uexOnload = function(type){
    if (!type) {
        //
		zy_con("content", "dymlogin_content.html", 0, $$("header").offsetHeight);
    }
	window.onorientationchange=window.onresize=function(){
		zy_resize("content",0,$$("header").offsetHeight);				
	}
}

function toregister()
{
	uexWindow.open("dymregister",0,"dymregister.html",1,"","",0,250);
}
function login(){
	var txtname=$$("username").value;
	var txtpswd=$$("pswd").value;
	txtname=encodeURIComponent(txtname);
	txtpwsd=encodeURIComponent(txtpswd);
	
	if(txtname==null||txtpswd==null)
	{
		uexWindow.toast(1,5,"密码，用户名不能为空。",500);
	}
	
	else{
		var httpID=1111;
	uexXmlHttpMgr.onData=function(inOpCode,inStatus,inResult){
		if(inStatus==1){
			alert(typeof inResult);
			var json=eval("(" + inResult + ")");
			if(json["success"])
			{
				window.localStorage.setItem("session_id",json["session_id"]);
				window.localStorage.setItem("username",json["username"]);
				window.localStorage.setItem("password",json["password"]);
				window.localStorage.setItem("PicNum",0);//初始化发状态时的照片数量 为0
				window.localStorage.setItem("offset",0);
				uexWindow.open("indexs",0,"indexs.html",1,"","",0,350);
			}
			else{
				uexWindow.toast(1,5,json["message"],500);
			}
		}
	}

	uexXmlHttpMgr.open(httpID,'get','http://www.diaoyumi.ourstu.com/api/public/login?username='+txtname+'&password='+txtpwsd,3000);
	//uexXmlHttpMgr.setPostData(httpID,'0','username',txtname);
	//uexXmlHttpMgr.setPostData(httpID,'0','password',txtpswd);
	uexXmlHttpMgr.send(httpID);
	}
	
}

</script>
</html>
